#ifndef POISSON_STATE_
#define POISSON_STATE_

#include "ompl/base/state.h"
#include "ompl/base/SpaceInformation.h"
#include "GPUPoissonState.h"

namespace poisson
{

	class PoissonState : public ompl::base::State
	{
	public:
		PoissonState(const ompl::base::SpaceInformation *si, const ompl::base::State* state, int id, int level);
		virtual ~PoissonState();

		ompl::base::State* getState() { return state_; }
		const ompl::base::State* getState() const { return state_; }

		int getId() const { return id_; }
		int getLevel() const { return level_; }
		bool isTreeNode() const { return isTreeNode_; }

		void setTreeNode(bool value) { isTreeNode_ = value; }
		void increaseLevel() { ++level_; }

		void convertToGPUState(GPUPoissonState& gpuState);

	protected:
		const ompl::base::SpaceInformation *si_;
		ompl::base::State* state_;

		int id_;
		int level_;
		bool isTreeNode_;
	};
}

#endif